using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using Helper;
namespace CoreData
{
    public class Student_FeeTime
    {
            public long ID{get;set;}
            public long StudentID{get;set;}
            public string Times{get;set;}
            public DateTime StartDate1{get;set;}
            public DateTime EndDate1{get;set;}
            public DateTime StartDate2{get;set;}
            public DateTime EndDate2{get;set;}
            public DateTime StartDate3{get;set;}
            public DateTime EndDate3{get;set;}
            public DateTime StartDate4{get;set;}
            public DateTime EndDate4{get;set;}
            public DateTime StartDate5{get;set;}
            public DateTime EndDate5{get;set;}
            public DateTime StartDate6{get;set;}
            public DateTime EndDate6{get;set;}
            public long Money1{get;set;}
            public long Money2{get;set;}
            public long Money3{get;set;}
            public long Money4{get;set;}
            public long Money5{get;set;}
            public long Money6{get;set;}
            public int Type{get;set;}
         
        public Student_FeeTime()
        {       
                            Times ="";   
        }
        
       static Student_FeeTime DynamicCast<T>(object row_data, object row_header) where T : Student_FeeTime
       {
           // row_data : DataRow
           // row_header : DataColumnCollection
           Student_FeeTime ret = new Student_FeeTime();
           DataRow dt = (DataRow)row_data;

           foreach (DataColumn column in (DataColumnCollection)row_header)
           {
               switch (column.ColumnName)
               {
                      case  "ID":
                        ret.ID = ConvertObject.ToLong(dt[column]);
                       break;
                      case  "StudentID":
                        ret.StudentID = ConvertObject.ToLong(dt[column]);
                       break;
                      case  "Times":
                        ret.Times = ConvertObject.ToString(dt[column]);
                       break;
                      case  "StartDate1":
                        ret.StartDate1 = ConvertObject.ToDateTime(dt[column]);
                       break;
                      case  "EndDate1":
                        ret.EndDate1 = ConvertObject.ToDateTime(dt[column]);
                       break;
                      case  "StartDate2":
                        ret.StartDate2 = ConvertObject.ToDateTime(dt[column]);
                       break;
                      case  "EndDate2":
                        ret.EndDate2 = ConvertObject.ToDateTime(dt[column]);
                       break;
                      case  "StartDate3":
                        ret.StartDate3 = ConvertObject.ToDateTime(dt[column]);
                       break;
                      case  "EndDate3":
                        ret.EndDate3 = ConvertObject.ToDateTime(dt[column]);
                       break;
                      case  "StartDate4":
                        ret.StartDate4 = ConvertObject.ToDateTime(dt[column]);
                       break;
                      case  "EndDate4":
                        ret.EndDate4 = ConvertObject.ToDateTime(dt[column]);
                       break;
                      case  "StartDate5":
                        ret.StartDate5 = ConvertObject.ToDateTime(dt[column]);
                       break;
                      case  "EndDate5":
                        ret.EndDate5 = ConvertObject.ToDateTime(dt[column]);
                       break;
                      case  "StartDate6":
                        ret.StartDate6 = ConvertObject.ToDateTime(dt[column]);
                       break;
                      case  "EndDate6":
                        ret.EndDate6 = ConvertObject.ToDateTime(dt[column]);
                       break;
                      case  "Money1":
                        ret.Money1 = ConvertObject.ToLong(dt[column]);
                       break;
                      case  "Money2":
                        ret.Money2 = ConvertObject.ToLong(dt[column]);
                       break;
                      case  "Money3":
                        ret.Money3 = ConvertObject.ToLong(dt[column]);
                       break;
                      case  "Money4":
                        ret.Money4 = ConvertObject.ToLong(dt[column]);
                       break;
                      case  "Money5":
                        ret.Money5 = ConvertObject.ToLong(dt[column]);
                       break;
                      case  "Money6":
                        ret.Money6 = ConvertObject.ToLong(dt[column]);
                       break;
                      case  "Type":
                        ret.Type = ConvertObject.ToInt(dt[column]);
                       break;
                
                   default:
                       break;
               }
           }

           return ret;
       }
        
    }
}
